


Homestuck pesterlog autoformatting script

by complexQuanta



Category: Homestuck
Genre: Meta, Pesterlog
Language: English
Status: Completed
Published: 2013-11-15
Updated: 2013-11-15
Packaged: 2018-01-01 16:01:55
Rating: General Audiences
Warnings: No Archive Warnings Apply
Chapters: 1
Words: 497
Publisher: archiveofourown.org
Story URL: https://archiveofourown.org/works/1045803
Author URL: https://archiveofourown.org/users/complexQuanta/pseuds/complexQuanta
Summary: <blockquote class="userstuff">
              <p>This script automatically adds AO3 pesterlog formatting tags to a text file.  Instructions included.</p><p>(This isn't a fic, it's a fic-writing tool).</p>
            </blockquote>





	Homestuck pesterlog autoformatting script

**Author's Note:**

> EDIT: There's now [an automated version](https://googledrive.com/host/0BzYvKgHTsMZib2tJeXdGdHJFUmc/helloworld.html)!! You should probably use that instead!
> 
> This is a script originally written for the "sed" utility. If you aren't a unix nerd, there's an online sed implementation at http://lvogel.free.fr/jsed/jsed.html . Copy/paste the script below into the "Script:" box, and put your (plain text/HTML) fic in the "Input:" box.
> 
> I used a version of this for the latest chapter of my own fic, and it worked well, but I haven't had a chance to test all of the characters; please let me know if it does anything stupid. I only have the beta kids and trolls so far.
> 
> Don't forget to choose "Homestuck Skin" as a Custom Stylesheet on your AO3 work.
    
    
    # Pesterlog formatting script by complexQuanta
    # v0.1, 11/15/13
    # Public domain
    # Written for "sed"
    # 
    # This script will:
    # 1)  Change the font and character color for every line of text that starts with 
    # "EB:" or "JOHN:" (or other character).  Must be all-caps, at the beginning of the line.
    #
    # 2)  Change the font and character code for any line that starts and ends
    # with "--".  This is appropriate for "started pestering", "blocked", etc.
    #
    # 3)  Add formatting to every instance of [EB], etc., everywhere (so that the character's
    # abbreviation is colored in the "started pestering" line.
    #
    # 4)  Fix every instance of <> everywhere to AO3 coding.
    
    s/<>/\<\>/g
    
    s/^EB:\(.*\)/<span class=\"john\">EB:\1<\/span>/
    s/^JOHN:\(.*\)/<span class=\"john\">JOHN:\1<\/span>/
    s/\[EB\]/<span class=\"john\">[EB]<\/span>/g
    
    s/^TT:\(.*\)/<span class=\"rose\">TT:\1<\/span>/
    s/^ROSE:\(.*\)/<span class=\"rose\">ROSE:\1<\/span>/
    s/\[TT\]/<span class=\"rose\">[TT]<\/span>/g
    
    s/^TG:\(.*\)/<span class=\"dave\">TG:\1<\/span>/
    s/^DAVE:\(.*\)/<span class=\"dave\">DAVE:\1<\/span>/
    s/\[TG\]/<span class=\"dave\">[TG]<\/span>/g
    
    s/^GG:\(.*\)/<span class=\"jade\">GG:\1<\/span>/
    s/^JADE:\(.*\)/<span class=\"jade\">JADE:\1<\/span>/
    s/\[GG\]/<span class=\"jade\">[GG]<\/span>/g
    
    s/^AA:\(.*\)/<span class=\"aradia\">AA:\1<\/span>/
    s/^ARADIA:\(.*\)/<span class=\"aradia\">ARADIA:\1<\/span>/
    s/\[AA\]/<span class=\"aradia\">[AA]<\/span>/g
    
    s/^AT:\(.*\)/<span class=\"tavros\">AT:\1<\/span>/
    s/^TAVROS:\(.*\)/<span class=\"tavros\">TAVROS:\1<\/span>/
    s/\[AT\]/<span class=\"tavros\">[AT]<\/span>/g
    
    s/^TA:\(.*\)/<span class=\"sollux\">TA:\1<\/span>/
    s/^SOLLUX:\(.*\)/<span class=\"sollux\">SOLLUX:\1<\/span>/
    s/\[TA\]/<span class=\"sollux\">[TA]<\/span>/g
    
    s/^CG:\(.*\)/<span class=\"karkat\">CG:\1<\/span>/
    s/^KARKAT:\(.*\)/<span class=\"karkat\">KARKAT:\1<\/span>/
    s/\[CG\]/<span class=\"karkat\">[CG]<\/span>/g
    
    s/^AC:\(.*\)/<span class=\"nepeta\">AC:\1<\/span>/
    s/^NEPETA:\(.*\)/<span class=\"nepeta\">NEPETA:\1<\/span>/
    s/\[AC\]/<span class=\"nepeta\">[AC]<\/span>/g
    
    s/^GA:\(.*\)/<span class=\"kanaya\">GA:\1<\/span>/
    s/^KANAYA:\(.*\)/<span class=\"kanaya\">KANAYA:\1<\/span>/
    s/\[GA\]/<span class=\"kanaya\">[GA]<\/span>/g
    
    s/^GC:\(.*\)/<span class=\"terezi\">GC:\1<\/span>/
    s/^TEREZI:\(.*\)/<span class=\"terezi\">TEREZI:\1<\/span>/
    s/\[GC\]/<span class=\"terezi\">[GC]<\/span>/g
    
    s/^AG:\(.*\)/<span class=\"vriska\">AG:\1<\/span>/
    s/^VRISKA:\(.*\)/<span class=\"vriska\">VRISKA:\1<\/span>/
    s/\[AG\]/<span class=\"vriska\">[AG]<\/span>/g
    
    s/^CT:\(.*\)/<span class=\"equius\">CT:\1<\/span>/
    s/^EQUIUS:\(.*\)/<span class=\"equius\">EQUIUS:\1<\/span>/
    s/\[CT\]/<span class=\"equius\">[CT]<\/span>/g
    
    s/^TC:\(.*\)/<span class=\"gamzee\">TC:\1<\/span>/
    s/^GAMZEE:\(.*\)/<span class=\"gamzee\">GAMZEE:\1<\/span>/
    s/\[TC\]/<span class=\"gamzee\">[TC]<\/span>/g
    
    s/^CA:\(.*\)/<span class=\"eridan\">CA:\1<\/span>/
    s/^ERIDAN:\(.*\)/<span class=\"eridan\">ERIDAN:\1<\/span>/
    s/\[CA\]/<span class=\"eridan\">[CA]<\/span>/g
    
    s/^CC:\(.*\)/<span class=\"feferi\">CC:\1<\/span>/
    s/^FEFERI:\(.*\)/<span class=\"feferi\">FEFERI:\1<\/span>/
    s/\[CC\]/<span class=\"feferi\">[CC]<\/span>/g
    
    s/^\( *--.*-- *\)$/<span class="\black\">\1<\/span>/g
    

**Author's Note:**

> If anything doesn't work, or if you'd like to request more features, the most helpful thing would be a pastebin link to a fic that isn't working. If you find this helpful, I always appreciate hearing about it.


End file.
